#define _CRT_SECURE_NO_WARNINGS
#include "MyString.h"

using std::cin;
using std::cout;
using std::endl;

void test1()
{
	wzx::string s1("abcdef");
	cout << s1.c_str() << endl;

	wzx::string::iterator it = s1.begin();
	while (it != s1.end())
	{
		(*it)++;
		it++;
	}
	cout << s1.c_str() << endl;

	for (auto& x : s1)
	{
		x++;
	}
	cout << s1.c_str() << endl;
}




//size_t fuc(char* px)
//{
//	return sizeof(px);
//}
//
//
//size_t fuc(const char* px)
//{
//	return sizeof(px);
//}




void test2()
{

	//char str[] = "abcdef";
	//cout << fuc(str) << endl;
	//const char* ss = "abcdef";
	//cout << fuc(ss) << endl;


	//wzx::string s1("abcdef");
	//cout << s1.c_str() << endl;
	//s1 += 'c';
	//cout << s1.c_str() << endl;

	//s1 += "sdkkkkkkkkkfghjk";
	//cout << s1.c_str() << endl;




	wzx::string s1 = "hello";
	;
	cout << s1.c_str() << endl;



}


void test3()
{
	//wzx::string s1 = "abcdefxxx k";
	//wzx::string s2 = "11";

	//cout << (s1 < s2) << endl;
	//cout << (s1 > s2) << endl;
	//cout << (s1 <= s2) << endl;
	//cout << (s1 >= s2) << endl;
	//cout << (s1 == s2) << endl;
	//cout << (s1 != s2) << endl;

	//wzx::string s1 = "abc";
	//s1 += '\0';
	//s1 += "abc";
	//cout << s1 << endl;

	cout << "xxxxx";
	cout << '\0';
	cout << "xxxxx";

}

void test4()
{
	wzx::string s1 = "abcdef";
	cout << s1 << endl;

	cin >> s1;
	cout << s1 << endl;

	wzx::getline(std::cin, s1);
	cout << s1 << endl;


}


void test5()
{

	//wzx::string s1;
	//cin >> s1;
	//cout << s1;

	//strlen(nullptr);
	std::string s1 = "abcdef";

	std::string::reverse_iterator rit = s1.rbegin();

	while (rit != s1.rend())
	{
		cout << *rit << ' ';
		rit++;
	}



}





void test8()
{
	wzx::string s1 = "abcdeg";
	cout << s1;

	s1.insert(5, "kkkkkkkkkk");
	cout << s1;
}




int main()
{




	//
	// test5();

	test8();

	//test4();
	//test3();
	return 0;
}